package com.example.leetcode.string;

import com.example.leetcode.string.common.StringUtils;

class Solution819 {
    public String mostCommonWord(String paragraph, String[] banned) {
        return StringUtils.mostCommonWord(paragraph, banned);
    }
}

public class leetcode819 {
    public static void main(String[] args) {
        Solution819 solution819 = new Solution819();
        String paragraph = "Bob hit a ball, the hit BALL flew far after it was hit. ?";
        String[] banned = {"hit"};
        System.out.println(solution819.mostCommonWord(paragraph, banned));

        String paragraph1 = "a, a, a, a,  b,b,b,c, c?? .";
        String[] banned1 = {"a"};
        System.out.println(solution819.mostCommonWord(paragraph1, banned1));

        String paragraph2 = "..Bob hit a ball, the hit BALL flew far after it was hit.";
        String[] banned2 = {"hit"};
        System.out.println(solution819.mostCommonWord(paragraph2, banned2));
    }
}
